<include file="./Application/Home/View/default/public/header.html" title="我的课程"/>
<link rel="stylesheet" href="/Public/teacher/courseorder/courseorder.css">
<div id="teacher-form" class="teacher-form body-margin">
    <div class="container">
        <div class="row">
            <div class="col-md-12 form-body">
                <div class="panel panel-default">
                    <div class="panel-heading text-center">
                        <h3 class="panel-title">您的课程</h3>
                    </div>
                    <div class="tab-course">
                        <nav>
                            <a href="?type=all" class="btn">全部课程</a>
                            <a href="?type=inpay" class="btn">待付款课程</a>
                            <a href="?type=handing" class="btn">进行中课程</a>
                            <a href="?type=dealing" class="btn">待处理课程</a>
                            <a href="?type=end" class="btn">已结束课程</a>
                        </nav>
                         <table class="table table-condensed">
                                <tr>
                                    <td>课程编号</td>
                                    <td>状态</td>
                                    <td>上课时间</td>
                                    <td>学科</td>
                                    <td>老师</td>
                                    <td>课时单价</td>
                                    <td>剩余上课课时数</td>
                                    <td>消费详情</td>
                                    <td>上课记录</td>
                                    <td>操作</td>
                                </tr>
                                <foreach name="lists" item="course">
                                    <tr>
                                        <td class="order-id" is_certified="{$course.is_certified}">{$course.order_sn}</td>
                                        <td>
                                            <?php $statusarr = array('1' =>'待审核', '2' =>'待付款','3' =>'进行中','4' =>'待结束','5' =>'已结束');?>
                                            <?php echo $statusarr[$course['status']];?>
                                        </td>
                                        <td>{$course.date}</td>
                                        <td>{$course.lesson}</td>
                                        <td class="teacher">{$course.relname}</td>
                                        <td class="courseprice">{$course.courseprice}</td>
                                        <td>{$course.coursenum}</td>
                                        <td class="pay-detail">
                                           <if condition="($course.paydetail neq '') AND ($course['status'] gt 2) ">
                                                <a href="javascript:;" class="pay-detail-btn">查看</a>
                                           <else/>
                                                -
                                           </if>
                                        </td>
                                        <td>
                                            <if condition="($course.paydetail neq '') AND ($course['status'] gt 2) ">
                                                <a href="javascript:;" class="">查看</a>
                                            <else/>
                                                 -
                                            </if>
                                        </td>
                                        <td>
                                            <if condition="($course['status'] eq 2) ">
                                            <a href="javascript:;" class="pay-btn">购买</a> </if>
                                            <a href="javascript:;" class="">投诉</a>
                                        </td>
                                    </tr>
                                </foreach>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="FastFindModal" tabindex="-1" role="dialog" aria-labelledby="FastFindModalLabel" aria-hidden="true">
        <div class="modal-dialog text-center">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span>
                    </button>
                    <h4 class="modal-title" id="FastFindModalLabel">请填写购买课时数</h4>
                </div>
                <form action="/Home/Pay/doalipay" id="payForm" method="post">
                    <div class="modal-body">
                        <div class="login-form" ng-controller="FastOrderCtrl">
                            <div class="form-group clearfix">
                                <label class="control-label left" for="coursenum">课时</label>
                                <input class="form-control login-field long_coursenum" type="text" placeholder="请输入您预约课时" id="coursenum" name="coursenum" required="">
                                <input type="hidden" name="trade_name" rel="订单名称">
                                <input type="hidden" name="courseprice" rel="单价">
                                <input type="hidden" name="WIDbody" rel="订单描述">
                                <input type="hidden" name="WIDout_trade_no" rel="订单id">
                                <input type="hidden" name="is_certified" rel="验证">
                            </div>
                            <a href="javascript:;" class="btn bg-green white btn-lg btn-block" id="payBtn">点击支付</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

   <div class="modal fade" id="payDetailPanel" tabindex="-1" role="dialog" aria-hidden="true">
       <div class="modal-dialog text-center">
           <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span>
                    </button>
                    <h4 class="modal-title" id="FastFindModalLabel">请填写购买课时数</h4>
                </div>
           </div>
       </div>
   </div>
</div>
<include file="./Application/Home/View/default/public/footer.html"/>
<script type="text/javascript" src="/Public/teacher/courseorder/vue.min.js"></script>
<script type="text/javascript" src="/Public/teacher/courseorder/courseorder.js"></script>
</body>
</html>
